#ifndef INTERFACEPLUGIN_H
#define INTERFACEPLUGIN_H

#include "pluginMetaData.h"
#include <QSharedPointer>
#include <QString>
#include <QtPlugin>
#include <QObject>

/**
 * @brief The InterfacePlugin class 所有CpeManager插件的基类，用于插件实例化时的过滤，插件启动，插件间通信
 */
class InterfacePlugin
{
public:
    virtual ~InterfacePlugin() {}
    virtual void recMsgfromManager(PluginMetaData metadata) = 0;
    virtual void startPlugin() = 0;

signals:
    virtual void sendMsg2Manager(PluginMetaData metadata) = 0;
};

Q_DECLARE_INTERFACE(InterfacePlugin, "com.kk.cpemanager.interfaceplugin")
#define getInterface(X) g_pCpePluginManager->getPluginInterface<ICpe##X>("Cpe"#X)
#endif
